{extend name="admin@public/content"}

{block name="content"}
<form onsubmit="return false;" action="{:request()->url()}" data-auto="true" method="post"
			class='form-horizontal layui-form padding-top-20'>

	<div class="form-group">
		<label class="col-sm-2 control-label">
			公司名称<br><span class="nowrap color-desc"></span>
		</label>
		<div class='col-sm-8'>
			<input name="title" required="required" title="请输入公司名称" placeholder="请输入公司名称" value="{$vo.title|default=''}"
						 class="layui-input">
			<p class="help-block">当前公司名称，在后台主标题上显示</p>
		</div>
	</div>

	<div class="form-group">
		<label class="col-sm-2 control-label">
			公司标识<br><span class="nowrap color-desc"></span>
		</label>
		<div class='col-sm-8'>
			<input name="mp_name" required="required" title="请输入公司标识" placeholder="请输入公司标识" value="{$vo.mp_name|default=''}"
						 class="layui-input">
			<p class="help-block">唯一标识</p>
		</div>
	</div>

	<div class="hr-line-dashed"></div>
	<div class="form-group">
		<label class="col-sm-2 control-label">
			联系人<br><span class="nowrap color-desc"></span>
		</label>
		<div class='col-sm-8'>
			<input name="link_username" required="required" title="请输入联系人" placeholder="请输入联系人"
						 value="{$vo.link_username|default=''}"
						 class="layui-input">
			<p class="help-block"></p>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label">
			联系电话<br><span class="nowrap color-desc"></span>
		</label>
		<div class='col-sm-8'>
			<input name="link_mobile" required="required" title="请输入联系电话" placeholder="请输入联系电话"
						 value="{$vo.link_mobile|default=''}"
						 class="layui-input">
			<p class="help-block"></p>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label">
			联系地址<br><span class="nowrap color-desc"></span>
		</label>
		<div class='col-sm-8'>
			<input name="link_address" required="required" title="请输入联系地址" placeholder="请输入联系地址"
						 value="{$vo.link_address|default=''}"
						 class="layui-input">
			<p class="help-block"></p>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label">
			管理员<br><span class="nowrap color-desc"></span>
		</label>
		<div class='col-sm-8'>
			<input name="user_id" id="user_id" type="hidden" value="{$vo.user_id|default=''}" class="layui-input">
			<input name="user_name" id="user_name" type="hidden" value="{$vo.user_name|default=''}" class="layui-input">
			<button id="show_name" data-iframe='{:url("user")}' type='button'
							class='layui-btn layui-btn-primary'>{$vo.user_name|default='选择用户'}
			</button>
		</div>
	</div>

	<div class="hr-line-dashed"></div>
	<div class="form-group">
		<label class="col-sm-2 control-label">
			有效期<br><span class="nowrap color-desc"></span>
		</label>
		<div class='col-sm-8'>
			<input name="end_at" id="end_at" value="{$vo.end_at|default=(time()+3600*24*365)|date='Y-m-d'}"
						 class="layui-input">
		</div>
	</div>

	<div class="col-sm-4 col-sm-offset-2">
		<div class="layui-form-item text-center">
			{if !empty($vo.id)}
			<input type="hidden" name="id" value="{$vo.id}"/>
			{else /}
			<input type="hidden" name="create_at" value="{:time()}"/>
			{/if}
			<input type="hidden" name="status" value="{$vo.status|default=1}"/>
			<button class="layui-btn" type="submit">保存配置</button>
		</div>
	</div>

</form>
<script>
	window.laydate.render({range: false, elem: '#end_at'});
</script>

{/block}